package cn.niit.dao;

import cn.niit.entity.Student;
import cn.niit.entity.Teacher;
import cn.niit.entity.query.StudentQuery;
import cn.niit.entity.query.TeacherQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 教师表(Teacher)表数据库访问层
 *
 * @author makejava
 * @since 2021-11-14 16:07:57
 */
public interface TeacherDao {
    //查询教师信息
    List<Teacher> queryByTeacher(TeacherQuery teacherQuery);
    //根据姓名查询教师信息
    List<Teacher> queryByTeacherName(TeacherQuery teacherQuery);
    //根据条件查询
    List<Teacher> select(TeacherQuery teacherQuery);

    //根据学号查询教师
    Teacher queryTeacherById(Integer id);

    int addTeacher(Teacher teacher);

    /**
     * 修改数据
     *
     * @param teacher 实例对象
     * @return 影响行数
     */
    int editTeacher(Teacher teacher);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteTeacherById(Integer id);

}